<!--
 * @description  :举报记录表列表内容
 * @descriptionDetail:举报记录表列表内容
 * @copyright    : 浙江烟草
 * @author       : dw
 * @create       : 2022-12-06 19:08:34
-->
<template>
  <view class="lt-root pdLf-16">
    <view class="lt-row tag-sty">
      <view>
        <text class="lt-left-label">
          单位名称：
        </text>
        <text class="lt-right-value">
          {{ itemInfo.orgName }}
        </text>
      </view>
      <u-tag style="flex-shrink: 0;height: fit-content;" :spStyle="getSpStyle(itemInfo)" mode="dark" shape="circle" :text="itemInfo.handleStatusName"></u-tag>
    </view>
    <view class="lt-row">
      <text class="lt-left-label">
        开始时间：
      </text>
      <text class="lt-right-value">
        {{ itemInfo.createTime }}
      </text>
    </view>
    <view class="lt-row">
      <text class="lt-left-label">
        完成时间：
      </text>
      <text class="lt-right-value">
        {{ itemInfo.finishTime }}
      </text>
    </view>
  </view>
</template>

<script>
const sysCodeColors = {
  "02": {
    color: "#EC7C37",
    borderColor: "#EC7C37",
    backgroundColor: "#FBE2D3",
  },
  "01": {
    color: "#01A79A",
    borderColor: "#01A79A",
    backgroundColor: "#C0ECE2",
  },
  "03": {
    color: "#0079F2",
    borderColor: "#0079F2",
    backgroundColor: "#E0ECFF",
  },
  "09": {  // 审批退回
    color: "#AC0000",
    borderColor: "#AC0000",
    backgroundColor: "#F2CCCC",
  },
  "04": {  // 已作废
    color: "#717579",
    borderColor: "#717579",
    backgroundColor: "#EDEEEF",
  },
};
export default{
  name:"ListItemPersonInvolved",
  props:{
    itemInfo:{
      type: Object,
      default:() => { return {} },
    },
  },
  data(){
    return {

    };
  },
  created() {

  },
  methods: {
    getSpStyle (it) {
      if(it.handleStatus == '01'){
        return sysCodeColors[it.handleStatus] || {};
      }else if(it.handleStatus == '02'){
        return sysCodeColors[it.handleStatus] || {};
      }else if(it.handleStatus == '03'){
        return sysCodeColors[it.handleStatus] || {};
      }else if(it.handleStatus == '09'){
        return sysCodeColors[it.handleStatus] || {};
      }else if(it.handleStatus == '04'){
        return sysCodeColors[it.handleStatus] || {};
      }
    },
  },
}
</script>

<style scoped lang="scss">
@import "../list_item.scss";
.pdLf-16{
  padding-left: 16rpx;
}
.tag-sty{
  display: flex;
  justify-content: space-between;
  padding-right: 28rpx;
}
</style>
